<#include "/template/_openwin.html" /> 
<#assign title="新增人员"> 
<@buttons>

<a href="#" class="easyui-linkbutton"
	data-options="plain:true,iconCls:'icon-save'" onclick="saveAndClose()">保存并关闭</a>
<a href="#" class="easyui-linkbutton"
	data-options="plain:true,iconCls:'icon-add'" onclick="save()">保存</a>
<a href="#" class="easyui-linkbutton"
	data-options="plain:true,iconCls:'icon-cancel'" onclick="javascript:window.close();">取消</a>
</@buttons> 

<@body>

<div>
<form id="ff" method="post" action="${root!}/frameuser/save">  
            <table class="form-table">  
                
                <tr>  
                    <td>登录名:</td>  
                    <td><input  style="width: 99%" class="easyui-validatebox" type="text" name="user.username" data-options="required:true"></input></td>  
                </tr>  
                <tr>  
                    <td>显示名:</td>  
                    <td><input  style="width: 99%" class="easyui-validatebox" type="text" name="user.displayname" data-options="required:true"></input></td>  
                </tr>  
                <tr>  
                    <td>性别:</td>  
                    <td><@select id="ss" name="user.sex" >
                    	<option value="0" >男</option>
                    	<option value="1" >女</option>
                    </@select></td>  
                </tr> 
                <tr>  
                    <td>邮箱:</td>  
                    <td><input  style="width: 99%" class="easyui-validatebox" type="text" name="user.mail" data-options="required:false"></input></td>  
                </tr> 
                <tr>  
                    <td>电话:</td>  
                    <td><input  style="width: 99%" class="easyui-validatebox" type="text" name="user.tel" data-options="required:false"></input></td>  
                </tr>
                <tr>  
                    <td>生日:</td>  
                    <td><@calendar name="user.birthday"  /></td>  
                </tr>
            </table>  
        </form>
</div>
</@body>
<script type="text/javascript">
function save(){
	$('#ff').form('submit',{
		success:function(msg){
	        alert(msg);
	        $('#ff').form('clear');
	    }
	});
}

function saveAndClose(){
	$('#ff').form('submit',{
		success:function(msg){
	        alert(msg);
	        window.returnValue="1";
			window.close();
	    }
	});
}
</script>